home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / cdplay1a / frmmain.frm (.txt) < prev    next >
Visual Basic Form  |  1999-09-19  |  5KB  |  171 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Alpha CD"
  5.    ClientHeight    =   2430
  6.    ClientLeft      =   150
  7.    ClientTop       =   150
  8.    ClientWidth     =   4680
  9.    Icon            =   "frmMain.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    ScaleHeight     =   2430
  13.    ScaleWidth      =   4680
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin VB.CommandButton Command8 
  16.       Caption         =   "Free VB Code"
  17.       Default         =   -1  'True
  18.       Height          =   375
  19.       Left            =   2040
  20.       TabIndex        =   0
  21.       Top             =   1920
  22.       Width           =   1455
  23.    End
  24.    Begin VB.Frame Frame1 
  25.       Caption         =   "Track Jump"
  26.       Height          =   855
  27.       Left            =   120
  28.       TabIndex        =   12
  29.       Top             =   960
  30.       Width           =   4455
  31.       Begin VB.CommandButton Command1 
  32.          Caption         =   "Play"
  33.          Height          =   375
  34.          Left            =   1440
  35.          TabIndex        =   5
  36.          TabStop         =   0   'False
  37.          Top             =   360
  38.          Width           =   615
  39.       End
  40.       Begin VB.CommandButton Command5 
  41.          Caption         =   "Stop"
  42.          Height          =   375
  43.          Left            =   2160
  44.          TabIndex        =   6
  45.          TabStop         =   0   'False
  46.          Top             =   360
  47.          Width           =   615
  48.       End
  49.       Begin VB.TextBox Text1 
  50.          Height          =   285
  51.          Left            =   840
  52.          TabIndex        =   4
  53.          Text            =   "1"
  54.          Top             =   360
  55.          Width           =   375
  56.       End
  57.       Begin VB.Label Label2 
  58.          Caption         =   "Track:"
  59.          Height          =   255
  60.          Left            =   120
  61.          TabIndex        =   13
  62.          Top             =   360
  63.          Width           =   615
  64.       End
  65.    End
  66.    Begin VB.Frame frmTime 
  67.       Caption         =   "Time Jump"
  68.       Height          =   735
  69.       Left            =   120
  70.       TabIndex        =   8
  71.       Top             =   120
  72.       Width           =   4455
  73.       Begin VB.TextBox Text2 
  74.          Height          =   285
  75.          Left            =   120
  76.          TabIndex        =   7
  77.          Text            =   "5"
  78.          Top             =   240
  79.          Width           =   495
  80.       End
  81.       Begin VB.CommandButton Command6 
  82.          Caption         =   "<<"
  83.          Height          =   375
  84.          Left            =   1680
  85.          TabIndex        =   10
  86.          TabStop         =   0   'False
  87.          Top             =   240
  88.          Width           =   495
  89.       End
  90.       Begin VB.CommandButton Command7 
  91.          Caption         =   ">>"
  92.          Height          =   375
  93.          Left            =   2280
  94.          TabIndex        =   9
  95.          TabStop         =   0   'False
  96.          Top             =   240
  97.          Width           =   495
  98.       End
  99.       Begin VB.Label Label1 
  100.          Caption         =   "Seconds"
  101.          Height          =   255
  102.          Left            =   720
  103.          TabIndex        =   11
  104.          Top             =   240
  105.          Width           =   975
  106.       End
  107.    End
  108.    Begin VB.CommandButton Command2 
  109.       Caption         =   "CD len"
  110.       Height          =   375
  111.       Left            =   3600
  112.       TabIndex        =   3
  113.       Top             =   1920
  114.       Width           =   975
  115.    End
  116.    Begin VB.CommandButton Command4 
  117.       Caption         =   "open tray"
  118.       Height          =   375
  119.       Left            =   120
  120.       TabIndex        =   2
  121.       Top             =   1920
  122.       Width           =   855
  123.    End
  124.    Begin VB.CommandButton Command3 
  125.       Caption         =   "close tray"
  126.       Height          =   375
  127.       Left            =   1080
  128.       TabIndex        =   1
  129.       Top             =   1920
  130.       Width           =   855
  131.    End
  132. Attribute VB_Name = "frmMain"
  133. Attribute VB_GlobalNameSpace = False
  134. Attribute VB_Creatable = False
  135. Attribute VB_PredeclaredId = True
  136. Attribute VB_Exposed = False
  137. Dim Snd As CDAudio
  138. Private Sub Command1_Click()
  139.     Snd.SeekCDtoX Val(Text1)
  140. End Sub
  141. Private Sub Command2_Click()
  142.     s$ = Snd.GetCDLength
  143.     MsgBox "Total length of CD: " & s, , "CD len"
  144. End Sub
  145. Private Sub Command3_Click()
  146.     Snd.CloseCD
  147. End Sub
  148. Private Sub Command4_Click()
  149.     Snd.EjectCD
  150. End Sub
  151. Private Sub Command5_Click()
  152.     Snd.StopPlay
  153. End Sub
  154. Private Sub Command6_Click()
  155.     Snd.ReWind Val(Text2) * 1000
  156. End Sub
  157. Private Sub Command7_Click()
  158.     Snd.FastForward Val(Text2) * 1000
  159. End Sub
  160. Private Sub Command8_Click()
  161.  frmAbout.Show
  162. End Sub
  163. Private Sub Form_Load()
  164.     Set Snd = New CDAudio
  165.     Snd.ReadyDevice
  166. End Sub
  167. Private Sub Form_Unload(Cancel As Integer)
  168.     Snd.StopPlay
  169.     Snd.UnloadAll
  170. End Sub
  171.